<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<!--	<script src="./lib/axios.min.js"></script>-->
</head>
<body>
<button>获取数据</button>
<div id="app"></div>
</body>
<script>
	const btn = document.querySelector("button");
	const app = document.querySelector("#app");
	btn.onclick = function () {
		window.fn = function(data){
			app.innerHTML = data.hot.map(item => `
				<div>
					<img height="200" src="${item.img}" alt="">
					<p>《${item.nm}》</p>
					<hr/>
				</div>

			`).join("")
		}
		
		const script = document.createElement("script");
		script.onload = function(){
			document.body.removeChild(script);
			delete window.fn;
		}
		script.src = "http://127.0.0.1:8090/movieListJsonp?cb=fn";
		document.body.appendChild(script);
		
		
		
		
		
		// http://localhost:63342/
		// axios.get("http://127.0.0.1:8090/movieList").then(value => {
		// 	app.innerHTML = value.data.hot.map(item => `
		// 		<div>
		// 			<img height="200" src="${item.img}" alt="">
		// 			<p>《${item.nm}》</p>
		// 			<hr/>
		// 		</div>
		//
		// 	`).join("")
		//
		// })
	}
</script>
</html>